#define MAX 5
#define RIGHT 6
#define UP 8
#define LEFT 4
#define DOWN 2
#define STAY 55
#define Shoot 66
void inigame();
void mandraw();
void manmove();
void refresh();
void way(); 
void arrowshoot(bool,int,int,int&,int);
void archerway();
void CDcount();
void archermoveJudge();
void arrowRPut(int memoryblock,int i,int j);
void arrowLPut(int memoryblock, int i, int j);
	int map[16][30] ={ { 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6 },
			         { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },
			         { 0,0,0,0,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },
			         { 0,0,0,0,3,2,2,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },
			         { 0,0,0,0,3,2,2,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },
			         { 0,0,0,0,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },
			         { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },
			         { 2,2,2,2,2,2,3,2,2,2,2,2,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 },
			         { 2,2,2,2,2,2,3,2,2,2,2,2,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 },
			         { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },
			         { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },
			         { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },
			         { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },
			         { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },
			         { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },
			         { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
	};
typedef struct coor {
	int x;
	int y;
}coor;
struct human
{
	int way;
	int speed;
	bool direction;
	int arrowCD = 15;
	int arrowtype = 1;
	coor xy[MAX];
}human;
struct archer {
	int way;
	bool direction;
	int x=0;
	int y=29;
	int moveCD = 2;
	int arrowCD = 15;
	int arrowtype = 2;
}archer;
struct arrow {
	int range = 5;
}arrow;
int x = human.xy[0].x / 50;
int y = human.xy[0].y / 50;
int memoryblock; //human
int memoryblock2;//human arrow
int memoryblock3;//archer arrow
int memoryblock4; //archer 